﻿CREATE TABLE [dbo].[Victims] (
    [Id]             INT IDENTITY (1, 1) NOT NULL,
    [LocationId]     INT NOT NULL,
    [AgeRangeID]     INT NULL,
    [GenderID]       INT NULL,
    [VictimStatusID] INT NULL,
    CONSTRAINT [PK_Victims] PRIMARY KEY CLUSTERED ([Id] ASC),
    CONSTRAINT [FK_AgeRange] FOREIGN KEY ([AgeRangeID]) REFERENCES [dbo].[Lookups] ([LookupID]),
    CONSTRAINT [FK_Gender] FOREIGN KEY ([GenderID]) REFERENCES [dbo].[Lookups] ([LookupID]),
    CONSTRAINT [FK_LocationVictims] FOREIGN KEY ([LocationId]) REFERENCES [dbo].[Locations] ([Id]) ON DELETE CASCADE,
    CONSTRAINT [FK_StatusVictim] FOREIGN KEY ([VictimStatusID]) REFERENCES [dbo].[Lookups] ([LookupID])
);

